import {searchSpan} from "@/api/span";
import {getFactoryNode, getNodeList} from "@/api/technology/process";

export const optionParent = {
  calcHeight: 95,
  tip: false,
  searchShow: true,
  searchMenuSpan: searchSpan(1),
  border: true,
  index: true,
  viewBtn: false,
  menuWidth: 150,
  dialogWidth: 880,
  dialogClickModal: false,
  selection:true,
  addBtn: false,
  delBtn:false,
  editBtn:false,
  // menu:false,
  column: [
    {
      label: '规则编码',
      prop: 'classRuleNo',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '规则名称',
      prop: 'classRuleName',
      search:true,
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '规则描述',
      prop: 'classRuleDescribe',
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
    },
    {
      label: '有效',
      prop: 'isValid',
      type: "select",
      addDisplay: false,
      editDisplay: false,
      viewDisplay:false,
      value:1,
      dicData: [
        {
          label: "是",
          value: 1
        },
        {
          label: "否",
          value: 2
        }
      ],
    },
    {
      label:'创建人员',
      prop:'createUserstr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label:'创建时间',
      prop:'createTimestr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label:'修改人员',
      prop:'updateUserstr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
    {
      label:'修改时间',
      prop:'updateTimestr',
      addDisplay:false,
      editDisplay:false,
      viewDisplay:false,
    },
  ],
  group:[{
    label:'班次规则信息',
    column: [
      {
        label: '规则编码',
        prop: 'classRuleNo',
        maxlength:20,
        showWordLimit:true,
        editDisabled:true,
        rules:[{
          required:true,
          message:"请输入规则编码",
          trigger: 'blur',
        }]
      },
      {
        label: '规则名称',
        prop: 'classRuleName',
        maxlength:20,
        showWordLimit:true,
        rules:[{
          required:true,
          message:"请输入规则名称",
          trigger: 'blur',
        }]
      },
      {
        label: '规则描述',
        prop: 'classRuleDescribe',
        maxlength:60,
        showWordLimit:true,
        type: "textarea",
        span:24,
        minRows:3,
        rules:[{
          required:true,
          message:"请输入规则描述",
          trigger: 'blur',
        }]
      },
      {
        label: '有效',
        prop: 'isValid',
        type: "select",
        value:1,
        dicData: [
          {
            label: "是",
            value: 1
          },
          {
            label: "否",
            value: 2
          }
        ],
      },
      {
        label:'创建人员',
        prop:'createUserstr',
        addDisplay:false,
        editDisplay:false,
      },
      {
        label:'创建时间',
        prop:'createTimestr',
        addDisplay:false,
        editDisplay:false,
      },
      {
        label:'修改人员',
        prop:'updateUserstr',
        addDisplay:false,
        editDisplay:false,
      },
      {
        label:'修改时间',
        prop:'updateTimestr',
        addDisplay:false,
        editDisplay:false,
      },
      {
        title: '',
        component: 'el-divider',
        span: 24,
        labelWidth: '0px',
        params: {
          contentPosition: 'left'
        },
      },
    ],
  }]
};

export const optionChild = {
  calcHeight: 95,
  tip: false,
  searchShow: true,
  searchMenuSpan: searchSpan(1),
  tree: true,
  border: true,
  index: true,
  viewBtn: true,
  menuWidth: 220,
  dialogWidth: 880,
  dialogClickModal: false,
  menu:false,
  addBtn:false,
  column: [
    {
      label:'班次编码',
      prop:'classNo'
    },
    {
      label:'班次名称',
      prop:'className'
    },
    {
      label:'班次描述',
      prop:'classDescribe'
    },
    {
      label: '开始时间',
      prop: 'startTime',
      type:"date",
      valueFormat : "HH:mm:ss",
    },
    {
      label: '结束时间',
      prop: 'endTime',
      type:"date",
      valueFormat : "HH:mm:ss",
    },
    {
      label:"工时",
      prop: "workingHours"
    },
    {
      label:'有效',
      prop:'isValid',
      type: "select",
      value:1,
      dicData: [
        {
          label: "是",
          value: 1
        },
        {
          label: "否",
          value: 2
        }
      ],
    },
    {
      label:'创建人员',
      prop:'createUserstr',
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'创建时间',
      prop:'createTimestr',
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'修改人员',
      prop:'updateUserstr',
      addDisplay:false,
      editDisplay:false
    },
    {
      label:'修改时间',
      prop:'updateTimestr',
      addDisplay:false,
      editDisplay:false
    },
  ]
};
